<!DOCTYPE html>
<html lang="zh">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>盒模型实验</title>
    <link rel="stylesheet" href="css/experiment.css">
</head>

<body>
    <div id="app" class="container">
        <div class="ctrl">
            <input type="range" name="w" id="w" min="0" max="200" value="100" v-model="w">
         <input type="range" name="h" id="h" min="0" max="200" value="100" v-model="h">
         <input type="color" v-model="bg">
        </div>
        <div class="prev">
            <div :style="{width:w+'px',height:h+'px','background-color':bg}"></div>
        </div>
        
        
        
    </div>

    <script src="https://unpkg.com/vue@3/dist/vue.global.js"></script>
    <script>
        const { createApp } = Vue

        createApp({
            data() {
                return {
                    w:100,
                    h:100,
                    bg:'black'
                }
            }
        }).mount('#app')
    </script>
</body>

</html>